//
//  TLNavigationController.swift
//  tenglvBusinessService
//
//  Created by lidi on 2019/2/15.
//  Copyright © 2019 tenglv. All rights reserved.
//

import UIKit

class TLNavigationController: UINavigationController, UIGestureRecognizerDelegate {

    override init(rootViewController: UIViewController) {
        super.init(rootViewController: rootViewController)
    }
    
    override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    }
    
    required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
    
    override func viewDidLoad() {
        self.interactivePopGestureRecognizer?.delegate = self
        super.viewDidLoad()
    }
    
    func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
        if self.viewControllers.count > 1 {
            return true
        } else {
            return false
        }
    }

}
